From 74a07e3d6344b31a5c89fc8f6214a8d19906d962 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 5 Dec 2005 13:26:32 +0000 Subject: [PATCH] Only decrement internal waypt_ct if waypt_head is flushed. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1617 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/waypt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gpsbabel/waypt.c b/gpsbabel/waypt.c index bf1af9880..ddd66e014 100644 --- a/gpsbabel/waypt.c +++ b/gpsbabel/waypt.c @@ -325,7 +325,9 @@ waypt_flush( queue *head ) QUEUE_FOR_EACH(head, elem, tmp) { waypoint *q = (waypoint *) dequeue(elem); waypt_free(q); - waypt_ct--; + if (head == &waypt_head) { + waypt_ct--; + } } } -- 2.30.2